import Vue from 'vue'
import Router from 'vue-router'
import Conmpostion from "../components/Conmpostion.vue";
import test from "../components/test.vue";
import index from "../view/index.vue"
import AdminHome from "../view/AdminHome.vue";
import Login from "../view/Login.vue";
import kankan from "../components/kankan.vue";
import Suser from '../view/admin/Suser.vue';
import Tuser from '../view/admin/Tuser.vue'
import sudenthome from '../view/student/sudenthome.vue';
import loginid from '../view/loginid.vue'
import studentInfo from '../view/student/studentInfo.vue'
import srudentbonus from '../view/student/srudentbonus.vue';
import teacherHome from '../view/teacher/teacherHome.vue'
import tlogin from '../view/teacher/tlogin.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/test',
      name: 'content',
      component: Conmpostion
    },
    {
      path: '/admin/login',
      name: 'login',
     
      component: Login
    },
    {
      path: '/',
      redirect: '/index'
    },
 
    {
      path: '/index',
      name: 'index',
      component: index

    },

    {
      path: '/show',
      name: 'test',
      component: test
    },
    {
      path: '/admin/home',
      name: 'admin',
      component: AdminHome,
      children: [
        {path:"suser",name:"suser",component: Suser},
        {path:"tuser",name:"suser",component: Tuser}
      ]

    },
    {
      path: '/kankan',
      component: kankan
    }, 
    {
      path: '/student',
      component: sudenthome,
      redirect: '/student/info',
      children:[
        {path:"info",name:"xinxi",component: studentInfo},
        {path:"jiafen",name:"jf",component: srudentbonus}
      ]
    },
    {
      path: '/slogin',
      component: loginid
    },
    {
      path: '/tlogin',
      component: tlogin
    },
    {
      path: '/teacher',
      component: teacherHome
    }

    
  ]
})
